﻿using JTC.Genetics._Interfaces;
using JTC.Genetics.Replication._Interfaces;
using JTC.Genetics.UnitTests.Fakes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using System;

namespace JTC.Genetics.UnitTests.Replication
{
    [TestClass]
    public class PlantCell_Replication_Tests
    {
        [TestMethod]
        public void Mitosis_call_Phases_Test()
        {
            Mock<IPlantCellReplicator> _mockDivider = new Mock<IPlantCellReplicator>();
            
            IReplicator _instance = new FakePlantCell(_mockDivider.Object);

            // Act

            ICellular act =  _instance.Replicate();

            _mockDivider.Verify(x => x.Interphase());
            _mockDivider.Verify(x => x.Preprophase());
            _mockDivider.Verify(x => x.Prophase());
            _mockDivider.Verify(x => x.Prometaphase());
            _mockDivider.Verify(x => x.Metaphase());
            _mockDivider.Verify(x => x.Anaphase());
            _mockDivider.Verify(x => x.Telophase());
            _mockDivider.Verify(x => x.Cytokinesis());

            Assert.AreEqual(_instance, act.Parent);
        }
    }
}
